package com.haruhi.utils;

import java.io.UnsupportedEncodingException;

/**
 * 一些类型的参数工具类
 */
public class ParamUtil {

    public static boolean isEmpty(String param) {
        return null == param || 0 == param.trim().length();
    }

    public static boolean isEmpty(Integer param) {
        return null == param || 0 == param;
    }
    public static boolean isEmpty(Long param) {
        return null == param || 0L == param;
    }

    /**
     * url编码字符转字符串
     * @param URLEncodeStr
     * @return
     */
    public static String strParse(String URLEncodeStr){
        try {
            return java.net.URLDecoder.decode(URLEncodeStr,"utf-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return null;
    }
}
